Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super Mario 64: Rework logic for 100 Coins #4131

Merged
merged 15 commits into from
Dec 12, 2024

Conversation

josephwhite
Copy link
Contributor

What is this fixing or adding?

This changes aims at refactoring the logic behind 100 Coin Stars to follow the same conventions as 1Up Boxes and Bob-omb Buddies.

  • Disabling the randomization just places the vanilla items in their locations via the generate_basic function.
  • Locations and their respective Rules are always created.

Also removes the logic that having 100 Coin Stars disabled would reduce the max star count.

How was this tested?

Generated several seeds using YAMLs for SM64 (and one other game for multi-world test cases). Looked for the following behaviors:

  • Locations for 100 Coin Stars are always present.
  • Disabling the 100 Coin Stars option will always populate the locations with Power Stars from their respective world.
  • (Regression Test) Enabling the 100 Coin Stars option can populate the locations with random items.

Also ran repo-wide unit tests.

@josephwhite josephwhite marked this pull request as ready for review November 3, 2024 01:58
@remyjette remyjette added the waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. label Nov 3, 2024
@remyjette
Copy link
Collaborator

As someone who plays with 100 coin stars off, I am personally against this change. Vanilla 100 coins stars mean they're still in logic, so I'm now required to do them.
I could then exclude them, sure, but in general if it's something common enough to exclude like 100 coin stars then I think it's better to just not have them in the pool at all - there are times when people want items not classified as useful/progression (construction robotics in Factorio comes to mind, for example), I would like to avoid the number of hint points required for a hint to not go up because of checks i don't plan on doing, etc.

This change takes that away and forces 100 stars into the pool for all sm64 games.

If someone wanted 100 coin stars to be vanilla, I would argue they could do that today, with plando. So while this PR makes doing a thing that could already be done easier, it takes an existing option for the rando away.

I wouldn't be against having 3 options for 100 coin stars (randomized, vanilla, disabled), but at the very least I want to keep the option to have 100 coin stars simply be disabled.

Obviously this is @N00byKing 's call as world maintainer, but wanted to offer my two cents as a frequent player of sm64 in ap.

@NewSoupVi
Copy link
Member

NewSoupVi commented Nov 3, 2024

This change really doesn't seem in the spirit of the option. People leave 100 coin stars off so they don't have to do them, not because they want them to be unrandomized.

Maybe a better change here would be to rename the option to "remove 100 coin stars" and reverse the values so that it's clearer what it does.

If N00byKing separately sees value in this option, it could be changed to a choice option like this (Edit: This is also what remyjette suggested, I didn't read their comment first):

100 coin stars:
  disable: 50  # Current "off" behavior
  vanilla: 0  # Always filled with local stars using the new code from this PR
  randomized: 0  # Current "on" behavior

Obviously I don't speak for N00byKing but I would highly question the removal of the ability to completely remove 100 coin stars.

@N00byKing
Copy link
Collaborator

I don't mind it being a separate option as described by @NewSoupVi and @remyjette, but replacing current behavior is definitely unwanted.
As was already mentioned, the option exists so that you don't have to play these stars, not so that you know what's there.

@ScipioWright ScipioWright added waiting-on: author Issue/PR is waiting for feedback or changes from its author. is: enhancement Issues requesting new features or pull requests implementing new features. and removed waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. labels Nov 3, 2024
@josephwhite
Copy link
Contributor Author

Reworked the logic based on feedback.

Copy link
Member

@NewSoupVi NewSoupVi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this is optional and all current behavior is retained, I will leave the rest of this up to N00byKing.

In terms of the actual code, I have two comments but these actually also go more in the direction of @N00byKing. I have some issues with the code, but josephwhite matched the style of the rest of the apworld here, so the comments are "out of scope" for this PR and these things don't actually need to be changed for me to approve it.

I'm not sure how much SM64 is still being worked on - If it is still getting content updates, I would like if a future PR could be opened for these changes, or they could be included with a content update PR. It's not like, pressing, though, so only if you were planning on working on this apworld more anyway, or if someone else volunteers to do it.

Comment on lines 18 to 20
option_Off = 0
option_On = 1
option_Vanilla = 2
Copy link
Member

@NewSoupVi NewSoupVi Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this apworld uses this casing for options, huh? That's odd, it's generally supposed to be written as option_off. But the rest of the options are like this too, so...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Would have preferred to stick with the casing used in the file to be consistent, but Options API.md does use snake case in its examples.

worlds/sm64ex/Regions.py Outdated Show resolved Hide resolved
@NewSoupVi NewSoupVi added waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. and removed waiting-on: author Issue/PR is waiting for feedback or changes from its author. labels Nov 4, 2024
Copy link
Collaborator

@N00byKing N00byKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Matching existing style seems good to me, and style inconsistency isn't really something that super duper needs to be fixed.
As you said, if/when a content update comes, it may be nice to roll that in.
I personally have no plans right now to do so.

@Exempt-Medic Exempt-Medic removed the waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. label Nov 28, 2024
Copy link
Member

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM. One small comment on option comparisons but otherwise this seems good. Tested some generations and the code doesn't have any evaluations of enable_coin_stars that would be thrown off by the option changes here.

@Exempt-Medic Exempt-Medic added the waiting-on: author Issue/PR is waiting for feedback or changes from its author. label Nov 28, 2024
@Exempt-Medic Exempt-Medic added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: author Issue/PR is waiting for feedback or changes from its author. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Nov 28, 2024
@NewSoupVi
Copy link
Member

NewSoupVi commented Nov 29, 2024

I just looked at the code again and realized something.

This effectively raises the total star count by 15, since it creates additional stars to put on the 100 coin locations.
Was that the intention? These stars are logical as well, since they are marked as progression, so they aren't really "extra" either, you could be required to actually hunt these down.

If this is intentional in its current state, I feel like it should probably be documented in the tooltip

To me, it would make more sense if either:

  1. These stars are not progression, as they are extra stars that get added ontop of the desired total to make the game easier.
  2. These stars are progression and you're intended to get them, and as such, they get taken from the intended total, rather than creating extra stars ontop of the total.

@NewSoupVi NewSoupVi merged commit 144d612 into ArchipelagoMW:main Dec 12, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants